Fix problem where child->requisition was accessed directly instead of
authorOwen Taylor <otaylor@redhat.com>
Tue, 8 Jan 2002 19:21:55 +0000 (19:21 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Tue, 8 Jan 2002 19:21:55 +0000 (19:21 +0000)
Tue Jan  8 14:19:43 2002  Owen Taylor  <otaylor@redhat.com>

* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate):
Fix problem where child->requisition was accessed
directly instead of calling get_child_requisition()
(#68199, Damon Chaplin)

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcheckbutton.c

index 4b949c61147b0e5124cf00bfdbc9bef4a68536c6..ced0d903b8c8db670e43c49a41a0b58079c97a67 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Jan  8 14:19:43 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): 
+       Fix problem where child->requisition was accessed
+       directly instead of calling get_child_requisition()
+       (#68199, Damon Chaplin)
+
 2001-01-08  James Henstridge  <james@daa.com.au>
 
        * gtk/gtkstyle.c: add trailing */ on doc comment.
index 4b949c61147b0e5124cf00bfdbc9bef4a68536c6..ced0d903b8c8db670e43c49a41a0b58079c97a67 100644 (file)
@@ -1,3 +1,10 @@
+Tue Jan  8 14:19:43 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): 
+       Fix problem where child->requisition was accessed
+       directly instead of calling get_child_requisition()
+       (#68199, Damon Chaplin)
+
 2001-01-08  James Henstridge  <james@daa.com.au>
 
        * gtk/gtkstyle.c: add trailing */ on doc comment.
index 4b949c61147b0e5124cf00bfdbc9bef4a68536c6..ced0d903b8c8db670e43c49a41a0b58079c97a67 100644 (file)
@@ -1,3 +1,10 @@
+Tue Jan  8 14:19:43 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): 
+       Fix problem where child->requisition was accessed
+       directly instead of calling get_child_requisition()
+       (#68199, Damon Chaplin)
+
 2001-01-08  James Henstridge  <james@daa.com.au>
 
        * gtk/gtkstyle.c: add trailing */ on doc comment.
index 4b949c61147b0e5124cf00bfdbc9bef4a68536c6..ced0d903b8c8db670e43c49a41a0b58079c97a67 100644 (file)
@@ -1,3 +1,10 @@
+Tue Jan  8 14:19:43 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): 
+       Fix problem where child->requisition was accessed
+       directly instead of calling get_child_requisition()
+       (#68199, Damon Chaplin)
+
 2001-01-08  James Henstridge  <james@daa.com.au>
 
        * gtk/gtkstyle.c: add trailing */ on doc comment.
index 4b949c61147b0e5124cf00bfdbc9bef4a68536c6..ced0d903b8c8db670e43c49a41a0b58079c97a67 100644 (file)
@@ -1,3 +1,10 @@
+Tue Jan  8 14:19:43 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): 
+       Fix problem where child->requisition was accessed
+       directly instead of calling get_child_requisition()
+       (#68199, Damon Chaplin)
+
 2001-01-08  James Henstridge  <james@daa.com.au>
 
        * gtk/gtkstyle.c: add trailing */ on doc comment.
index 4b949c61147b0e5124cf00bfdbc9bef4a68536c6..ced0d903b8c8db670e43c49a41a0b58079c97a67 100644 (file)
@@ -1,3 +1,10 @@
+Tue Jan  8 14:19:43 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): 
+       Fix problem where child->requisition was accessed
+       directly instead of calling get_child_requisition()
+       (#68199, Damon Chaplin)
+
 2001-01-08  James Henstridge  <james@daa.com.au>
 
        * gtk/gtkstyle.c: add trailing */ on doc comment.
index 4b949c61147b0e5124cf00bfdbc9bef4a68536c6..ced0d903b8c8db670e43c49a41a0b58079c97a67 100644 (file)
@@ -1,3 +1,10 @@
+Tue Jan  8 14:19:43 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): 
+       Fix problem where child->requisition was accessed
+       directly instead of calling get_child_requisition()
+       (#68199, Damon Chaplin)
+
 2001-01-08  James Henstridge  <james@daa.com.au>
 
        * gtk/gtkstyle.c: add trailing */ on doc comment.
index d1248363280d7840e6b6fb4b5b0a6280b743c8a6..9f6f76fcea2026c67e44b7d83f07db592eacb085 100644 (file)
@@ -299,14 +299,17 @@ gtk_check_button_size_allocate (GtkWidget     *widget,
       
       if (GTK_BIN (button)->child && GTK_WIDGET_VISIBLE (GTK_BIN (button)->child))
        {
+         GtkRequisition child_requisition;
          gint border_width = GTK_CONTAINER (widget)->border_width;
+
+         gtk_widget_get_child_requisition (GTK_BIN (button)->child, &child_requisition);
  
-         child_allocation.width = MIN (GTK_BIN (button)->child->requisition.width,
+         child_allocation.width = MIN (child_requisition.width,
                                        allocation->width -
                                        ((border_width + focus_width + focus_pad) * 2
                                         + indicator_size + indicator_spacing * 3));
 
-         child_allocation.height = MIN (GTK_BIN (button)->child->requisition.height,
+         child_allocation.height = MIN (child_requisition.height,
                                         allocation->height - (border_width + focus_width + focus_pad) * 2);
          child_allocation.x = (border_width + indicator_size + indicator_spacing * 3 +
                                widget->allocation.x + focus_width + focus_pad);